<template>
  <div class="app">
    <router-view></router-view>
    <ul class="nav" v-show="$route.meta.show">
      <li>
        <router-link :to="{ name: 'shouye' }">首页</router-link>
      </li>
      <li>
        <router-link :to="{ path: '/fenlei' }">分类</router-link>
      </li>
      <li>
        <router-link :to="{ path: '/car' }">购物车</router-link>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  mounted() {
    console.log(this.$router);
  },
};
</script>

<style lang="scss">
.router-link-active {
  color: red;
}
.router-link-exact-active {
  color: blue;
}
.app {
  font-size: 100px;
  padding-bottom: 150px;
  .nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    height: 150px;
    background-color: pink;
    /*  li {
      .router-link-active {
        color: red;
      }
    } */
  }
}
</style>